package com.jinsi.service.yrf.iml;

import com.jinsi.mapper.yrf.FeedbackStatisticsMapper;
import com.jinsi.service.yrf.FeedbackStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;


@Service
@Transactional
public class FeedbackStatisticsServiceImpl implements FeedbackStatisticsService {

    @Autowired
    private FeedbackStatisticsMapper feedbackStatisticsMapper;

    @Override
    public ArrayList<Integer> getAll(String feedbackListType) {
        Integer all = feedbackStatisticsMapper.getAll(feedbackListType);
        Integer all2 = feedbackStatisticsMapper.getAll2(feedbackListType,"差");
        Integer all3 = feedbackStatisticsMapper.getAll2(feedbackListType,"一般");
        Integer all4 = feedbackStatisticsMapper.getAll2(feedbackListType,"好");
        Integer all5 = feedbackStatisticsMapper.getAll2(feedbackListType,"很好");


        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(all2);
        arrayList.add(all3);
        arrayList.add(all4);
        arrayList.add(all5);
        arrayList.add(all);



        return arrayList;
    }

    @Override
    public ArrayList<Integer> getAll2(String feedbackListType,
                                      String classification) {
        return null;
    }


}
